# Config模块
file(GLOB CONFIG_SOURCES *.cpp)
file(GLOB CONFIG_HEADERS *.h)

add_library(config ${CONFIG_SOURCES} ${CONFIG_HEADERS})
target_include_directories(config PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/../../include/config
)

# 依赖项
find_package(Poco REQUIRED COMPONENTS Foundation XML JSON)
target_link_libraries(config PRIVATE
    Poco::Foundation
    Poco::XML
    Poco::JSON
    core  # 依赖core模块
)

# 安装规则
install(TARGETS config DESTINATION lib)
install(FILES ${CONFIG_HEADERS} DESTINATION include/config)